<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--在浏览器中需要引用这个文件-->
<!--强调模板引擎不关心你的字符串内容,只关心自己能认识的模板标记语法-->
<script src="../node_modules/art-template/lib/template-web.js"></script>
<script type="text/template" id="tpl">
    hello My name is {{ name }}
    I'm {{ age }} years old
    I come from {{ country }}
    I like {{ each hobbies }} {{ $value }} {{ /each }}
</script>
<script>
    let ret = template('tpl', {
      name: 'AqingCyan',
      age: 18,
      country: 'China',
      hobbies: [
        'Coding',
        'Playing Games'
      ]
    });
    console.log(ret); // 查看console
</script>
</body>
</html>
